<include file="public@head_top"/>
<include file="public@member_top"/>
</head>
<body class="bgeee">
<include file="public@head"/>

<div class="wrap clearfloat tc-main">
	<div class="row">
    
        <div class="col-lg-3 leftnav">
            <include file="public@usernav" />
        </div>
        
		<div class="col-lg-9 rightmain">

                <div class="card-header usertitle">
                    <ul class="nav nav-tabs card-header-tabs">
                      <li class="nav-item">
                        <a class="nav-link active" href="#one" data-toggle="tab"><i class="fa fa-list-ul"></i> 数据列表</a>
                      </li>
                      <li class="nav-item">
                        <a class="nav-link" href="{:cmf_url('portal/list/index',array('id'=>$configinfo.moduleid))}?act=supplier&type=add"><i class="fa fa-edit fa-fw"></i> 添加数据</a>
                      </li>
                    </ul>
                  </div>
                  
                <div class="tab-content usercontent st-tableStyleBlock">
                    <div class="tab-pane active st-tablestyle" id="one">
                        
                        <form method="get" action="/portal/list.html">
                                <div class="form-group row st-fleboxtb">
                                	<div class="col-sm-4">
                                        <select class="form-control" name="id" required id="input-category_id">
                                            <option value="{$configinfo['moduleid']}">{$configinfo['moduleinfo']['name']}</option>
                                            {$categories_tree}
                                        </select>
                                    </div>
                                    <div class="col-sm-5 col-12 st-xm-mt15">
                                      <div class="row">
                                        <div class="col-10">
                                            <input type="text" class="form-control" name="keyword" placeholder="搜索你的数据" value="{$_MGPC_REQ['keyword']}">
                                        </div>
                                        <div class="col-2" style="padding-left:0;">
                                            <input type="submit" class="btn btn-success" value="Go">
                                        </div>
                                      </div>
                                    </div>
                                    <div class="col-sm-3 col-12 st-xm-mt15 st-x-showmobile">
                                    	<a class="listbtn listbtn2 st-xm-wid100" href="{:cmf_url('portal/list/index',array('id'=>$configinfo.moduleid))}?act=supplier&type=add"><i class="fa fa-edit fa-fw"></i> 添加数据</a>
                                    </div>
                                </div>
                                <input type="hidden" name="act" value="supplier">
                                <input type="hidden" name="type" value="list">
                            </form>
                            <div class="st-x-tablerespon">
							<table class="table table-bordered table-striped table-hover st-tablelist4">
								<thead>
									<tr>
                                    	<th width="80">图片</th>
										<th>标题</th>
										<th width="120">分类</th>
                                        <th width="180" class="st-listbox2">发布时间</th>
										<th width="150">操作</th>
									</tr>
								</thead>
								<tbody>
									<php>
                                        $where=[
                                        'post.create_time'=>['egt',0]
                                        ];
                                        if($keyword)
                                        {
                                            $where+=[
                                                'post.post_title'=>['like',"%$keyword%"]
                                            ];
                                        } 
                                        $expwhere=[
                                        'supplierok'=>1
                                        ];          
                                        $page=[
                                            'list_rows'=>5,
                                            'next'=>$configlang['Next_page'],
                                            'prev'=>$configlang['Previous_page']
                                        ];
                                    </php>
                                    <portal:articles item="vo" where="$where" expwhere="$expwhere" order="post.create_time DESC" page="$page"
                                            relation="categories" categoryIds="$category.id" returnVarName="articles_data">
									<tr>
                                    	<td class="st-listbox4">
                                        <a class="img st-disb" href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" title="{$vo.post_title}">
                                            <empty name="vo.img_thumb">
                                                <img src="__TMPL__/public/assets/images/default-thumbnail.png"
                                                     alt="{$vo.post_title}" width="60" class="st-noauto st-xm-wid100">
                                                <else/>
                                                <img src="{:cmf_get_image_url($vo.img_thumb)}"
                                                     alt="{$vo.post_title}" width="60">
                                            </empty>
                                          </a>
                                        </td>
										<td class="st-listbox4"><a href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" style="text-decoration:none;">{$vo.post_title}</a></td>
                                        <td class="st-listbox2"><a class="status-text-green" href="{:cmf_url('portal/Article/index',array('id'=>$vo['id'],'cid'=>$vo['category_id']))}" target="_blank">{$configindex['columnlist'][$vo.category_id]['name']}</a></td>
                                        <td class="st-listbox2 xm-status-text-gray">{:date('Y-m-d H:i:s',$vo.published_time)}</td>
										<td class="st-listbox4 st-boxcenter">
											<a class="listaco listbtn listbtn1" href="{:cmf_url('portal/list/index',array('id'=>$configinfo.moduleid))}?act=supplier&type=edit&actid={$vo.id}">编辑</a> |
											<a class="js-ajax-dialog-btn listaco2 listbtn listbtn2" href="{:cmf_url('portal/list/index',array('id'=>$configinfo.moduleid))}?act=supplier&type=del&actid={$vo.id}" data-msg="您确定要删除该数据吗？" data-ok="" data-cacel="取消">删除</a>
										</td>
									</tr>
									</portal:articles>
								</tbody>
							</table>
                            </div>
							<div class="pagination"><page/></div>
                        
                    </div>
                </div>
                
        </div>
        
    </div>
</div>
<!-- /container -->

<include file="public@footer"/>
<include file="public@member_scripts"/>
</body>    
</html>